import { observable,action } from 'mobx-miniprogram'
const store = observable({
  token: '',
  userdata:'',
  setToken: action(function(payload){
    this.token = payload
  }),
  update_userdata:action(function(payload){
    this.userdata = payload
  }),
  get formatToken(){  //定义计算数学
    return 'Breare ' + this.token
  }
})

export default store
